package org.example.model.case2;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Website {
    private Address address;
 
    public Website(){
        log.info("执行了默认的无参的构造方法");
    }
 
    public Website(Address address){
        log.info("执行了有参的构造方法{}", address);
        this.address = address;
    }
 
    public void setAddress(Address address){
        log.info("执行了set方法{}", address);
        this.address = address;
    }
 
    public void showAddress(){
        this.address.info();
    }
}